import request from '@/utils/request'

// 添加职位
export function addPostApi(params = {}) {
  return request.post('/system/sysPosition', params)
}

// 修改职位
export function modifyPostApi(params = {}) {
  return request.put('/system/sysPosition', params)
}

// 通过职位参数分页获取职位数据
export function getPostListApi(params = {}) {
  return request.get('/system/sysPosition/page', { params })
}

// 通过参数职位列表
export function getPostByParamsApi(params = {}) {
  return request.get('/system/sysPosition/get', { params })
}

// 删除职位
export function deletePostApi(params) {
  return request.delete(`/system/sysPosition/${params.id}`)
}

// 批量删除
export function deletePostsApi(params) {
  return request.delete('/system/sysPosition/delete', {
    data: params
  })
}

// 导出职位
export function exportPostApi(params) {
  return request.post('/system/sysPosition/export', params, { responseType: 'blob' })
}
